using System;
using System.IO;
using System.Xml;

namespace Altova.IO
{
	public class WriterOutput : Output
	{
		private TextWriter writer;

		public override Stream Stream
		{
			get
			{
				throw new Exception("This is not a stream");
			}
		}

		public override TextWriter Writer
		{
			get
			{
				return writer;
			}
		}

		public override XmlDocument Document
		{
			get
			{
				throw new Exception("This is not an XML Dom tree");
			}
		}

		public WriterOutput(TextWriter w)
			: base(OutputType.Writer)
		{
			writer = w;
		}

		public override void Close()
		{
			writer.Close();
		}
	}
}
